package com.yc.sole.erp.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.yc.sole.common.enums.CommonState;
import jakarta.persistence.*;
import lombok.Data;

import java.math.BigDecimal;

/**
 * @author yizuomin
 * @date 2024/3/6 09:34
 **/
@Data
@Entity
@Table(name = "erp_process")
@TableName("erp_process")
public class Process {

    /**
     * id
     */
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @TableId(type = IdType.AUTO)
    private Long id;
    /**
     * 工序编码
     */
    @Column(columnDefinition = "VARCHAR(50) NOT NULL COMMENT '工序编码'")
    private String code;
    /**
     * 工序名称
     */
    @Column(columnDefinition = "VARCHAR(50) NOT NULL COMMENT '工序名称'")
    private String name;
    /**
     * 工序单价
     */
    @Column(columnDefinition = "DECIMAL(18,2) NOT NULL COMMENT '工序单价'")
    private BigDecimal unitPrice;
    /**
     * 状态
     */
    @Column(columnDefinition = "TINYINT(1) NOT NULL COMMENT '状态'")
    private CommonState state;
    /**
     * 备注
     */
    @Column(columnDefinition = "VARCHAR(255) COMMENT '备注'")
    private String remark;
}
